-- GENERATED SPELL FOR [Winterskorn Defender] --


function spell0_24015(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15496,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24015', 591, 1)
end

function spell1_24015(pUnit, Event) --@Demoralizing Shout,Self--
pUnit:FullCastSpellOnTarget(13730,pUnit)
pUnit:RegisterEvent('Sorts_24015', 30343, 1)
end

function spell2_24015(pUnit, Event) --@Knockdown,n/a--
pUnit:FullCastSpellOnTarget(18812,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24015', 2000, 1)
end

function Sorts_24015(pUnit, Event)
local choix_sorts_24015 = math.random(0, 2)
if choix_sorts_24015 == 0 then
pUnit:RegisterEvent('spell0_24015', 1, 1)
end
if choix_sorts_24015 == 1 then
pUnit:RegisterEvent('spell1_24015', 1, 1)
end
if choix_sorts_24015 == 2 then
pUnit:RegisterEvent('spell2_24015', 1, 1)
end
end

function mob24015_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24015', math.random(1500, 3000), 1)
end

function mob24015_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24015_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24015_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24015, 1, 'mob24015_Action')
RegisterUnitEvent(24015, 2, 'mob24015_Leave')
RegisterUnitEvent(24015, 3, 'mob24015_Kill')
RegisterUnitEvent(24015, 4, 'mob24015_Die')
